function trendSetList_li(dl){
	var dt = dl.children[0],dd = dl.children[1];
	var p=zeai.tag(dl,'p')[0],uid=dt.getAttribute("uid"),p,plist=[],img;
	//piclist
	if(!zeai.empty(p)){
		pic=zeai.tag(p,'img');
		for(var k=0;k<pic.length;k++) {
			img=pic[k];
			plist.push(img.src.replace('_s.','_b.'));
			(function(img){img.onclick=function(){ZeaiM.piczoom({browser:browser,b:img.src.replace('_s.','_b.'),list:plist});}})(img);
		}
	}
	var ddh1=zeai.tag(dd,'h1');
	//content pic
	if(ddh1){
		ddh1=ddh1[0];
		if(!zeai.empty(ddh1)){
			ddh1img=zeai.tag(ddh1,'img');
			ddh1img=ddh1img[0];
			if(!zeai.empty(ddh1img)){
				imgurl=ddh1img.src;
				if (imgurl.indexOf('_m.') != -1){	
					imgurl=imgurl.replace('_m.','_b.');
				}
				if(ddh1img.className=='photo_v'){
				}else{
					(function(imgurl){ddh1img.onclick=function(){ZeaiM.piczoom({browser:browser,b:imgurl,list:[imgurl]});}})(imgurl);
				}
			}
			//h1 a
			var ddA=zeai.tag(ddh1,'a');
			if(ddA.length==1){
				var Aobj=ddA[0],href=Aobj.href;
				//约会
				if (href.indexOf('/dating_detail.php?fid=') !== -1){
					var fid=returnId(href,'/dating_detail.php?fid=');
					Aobj.onclick=function(){zeai.openurl(MHOST+'/detail.php?id='+fid);}
				}else if(href.indexOf('/dating/') !== -1){
					//return false;//pc自适应
					var fid=returnId(href,'/dating/');
					Aobj.removeAttribute("href");
					if(zeai.ifint(fid)){
						Aobj.onclick=function(){zeai.openurl(MHOST+'/dating.php?id='+fid);}
					}else{
						Aobj.onclick=function(){zeai.openurl(MHOST+'/dating.php');}
					}
				}
			}

		}
	}
	//agree
	var agreeDIV = dl.getElementsByTagName("div")[0].children;
	var agree = agreeDIV[1],chat = agreeDIV[2],agreehtml = agree.getElementsByTagName("span")[0],bbshtml = chat.getElementsByTagName("span")[0];
	if (agree.className != 'ed'){
		agree.onclick = function (){
			var tid = this.parentNode.getAttribute("tid");
			zeai.ajax({url:MHOST+'/trend'+zeai.extname,data:{submitok:'ajax_agree',tid:tid}},function(e){rs=zeai.jsoneval(e);
				if(rs.flag==1){
					agree.className = 'ed';
					agree.onclick   = function (){}
					agreehtml.html(parseInt(agreehtml.innerHTML)+1);
					var b=agreehtml.parentNode.getElementsByTagName("b")[0];b.show();
					var img = document.createElement('img');img.src = rs.imgurl;if (!zeai.empty(img.classname))img.className = rs.classname;img.setAttribute('uid',rs.uid);
					var ul=dl.getElementsByTagName("ul")[0];
					if (rs.num == 1){
						var em = document.createElement('em');
						if(zeai.empty(ul)){
							var j  = document.createElement('div');j.className = 'j';dl.appendChild(j);
							dl.appendChild(em);
						}else{
							ul.parentNode.insertBefore(em,ul);
						}
					}else{
						var em  = dl.getElementsByTagName("em")[0];
					}
					em.insertBefore(img,em.firstChild);
					agreeHref();
				}else{zeai.msg(rs.msg);}
			});
		}
	}
	//agree list href
	agreeHref();
	function agreeHref(){
		var EM  = dl.getElementsByTagName("em")[0];
		if (!zeai.empty(EM)){
			EM = EM.children;
			for (var m=0;m<EM.length;m++){(function(m){
				EM[m].onclick=function(){
					zeai.openurl(MHOST+'/u.php?uid='+EM[m].getAttribute("uid"));
				}
			})(m);}
		}
	}
	//chat
	chat.onclick = function (){
		if(!zeai.empty(o('trendbbs'))){o('trendbbs').parentNode.remove();return false;}
		if(!zeai.empty(o('trendbbs'))){o('trendbbs').parentNode.remove();}
		var bbs=zeai.addtag('div');bbs.class('trend_bbsadd');
		var textarea=zeai.addtag('textarea');textarea.class('textarea small_big');textarea.id='trendbbs';textarea.setAttribute("placeholder","请文明发言");
		var btn=zeai.addtag('button');btn.class('btn size2 zeaibg small_big');btn.type='button';btn.html('提交评论');
		bbs.append(textarea);bbs.append(btn);
		dl.insertBefore(bbs,chat.parentNode.nextSibling);
		textarea.onblur=function(){setTimeout(function(){window.scrollTo(0,0)},200);}
		btn.onclick =function (){
			textarea.value = zeai.clearhtml(textarea.value);
			if(zeai.empty(textarea.value)){zeai.msg('请输入内容(200字以内)');return false;}
			var fid=chat.parentNode.getAttribute("tid");
			zeai.confirm('<b class="S18">确定提交么？</b><br>以下情形话题将被删除或封号：<br>1．请勿在内容里留下任何形式的联系方法<br>2．请勿发表涉黄涉政言论<br>3．请勿发表不文明或辱骂攻击他人言论',function(){
				zeai.ajax({url:MHOST+'/trend'+zeai.ajxext+'submitok=trend_bbs_add',data:{fid:fid,content:textarea.value}},function(e){rs=zeai.jsoneval(e);
					zeai.msg(0);zeai.msg(rs.msg);
					if(rs.flag==1){
						bbshtml.html(parseInt(bbshtml.innerHTML)+1);
						var agreenumm=parseInt(agreehtml.innerHTML);
						if(agreenumm==0){var j=zeai.addtag('div');j.class('j');dl.append(j);}
						var ul=dl.getElementsByTagName("ul")[0];
						if(zeai.empty(ul)){ul=zeai.addtag('ul');dl.append(ul);}
						setTimeout(function(){ul.insertAdjacentHTML('afterbegin',html_decode(rs.C));},100);
						bbs.addClass('big_small');setTimeout(function(){bbs.remove();},300);
					}
				});
			});
		}
	}
}
function trend_uFn(uid){zeai.openurl(MHOST+'/u.php?uid='+uid);}
function trendSetList(){
	zeai.listEach(zeai.tag(o('ZEAI_list'),'dl'),function(dl){
		trendSetList_li(dl);
	});
}
trendSetList();
